package com.bltec.emergency.service.resService.impl;

import com.bltec.emergency.mapper.ResShipMapper;
import com.bltec.emergency.model.ResShip;
import com.bltec.emergency.service.resService.ResShipService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class ResShipServiceImpl implements ResShipService {
    @Resource
    private ResShipMapper resShipMapper;
    @Override
    public boolean add(ResShip resShip) {
        return resShipMapper.insert(resShip);
    }

    @Override
    public boolean deleteResShipById(Long id) {
        return resShipMapper.setDisableById(id);
    }

    @Override
    public boolean updateResShipById(ResShip resShip) {
        return resShipMapper.updateResShipById(resShip);
    }

    @Override
    public ResShip getResShipById(Long id) {
        return resShipMapper.getResShipById(id);
    }

    @Override
    public List<ResShip> getAll() {
        return resShipMapper.selectAll();
    }
}
